Running WS-AppServer in Multitenant Mode |
|
Multitenant refers to a single instance of an application serving multiple client organizations (tenants). The following are the salient features of Multitenant deployment of Process Platform:
- Achieve the desired isolation between tenants by creating a separate organization for each tenant.
- Ensure scalabilty by sharing resources. In Process Platform, this is achieved by using the same Service Container to cater to multiple tenants.
A WS-AppServer Service Container running in system organization will be able to perform the following tasks:
- Work with multiple databases, one for each tenant if needed.
- Work with multiple versions of the application JAR, one for each tenant if required
- Allow the hosting party to offer different levels of service to different tenants (This feature is restricted to Advanced Properties of a DSO currently).
Note:
For managing the new tenants or changing the configuration of the existing tenants, the Service Container need not be restarted.
- Install the application ISVP.
- Place the application JARs in the WS-AppServer Deploy folder.
- The wsapps.properties file in CORDYS_INSTALL_DIR/components/wsappserver/config folder has the property wsappserver.deploy.folder which specifies the location of the WS-AppServer Deploy folder.
- Create a Service Group and Service Container for the application in the System organization.
- Attach the application Web services to the Service group.
- Create a DSO for the application in the System organization and point the Service Container to the DSO.(The DSO should be a valid DSO though it is not used)
- For a tenant to subscribe to the application, the following steps should be performed:
- Create a DSO with the name of the DSO to which the Service Container points.
- Make the DSO point to the tenant database.
- If the application JARs have been customized, place the JARs specific to the tenant in the WS-AppServer deploy folder. For example if the organization name is Acme then the folder name will be Acme in the WS-AppServer deploy folder.
- Customize the Advanced Properties of a DSO for the tenant. Customizing the properties involves the following steps:
- Define the levels of the Service in the XML Store in plans file which is in the ISV space at the location /Cordys/configurations/.
- The structure of the XML is as follows
<Levels xmlns="http://schemas.cordys.com/levels"> <Level name="gold"> <dso> <cursorCacheSize>50</cursorCacheSize> <cursorCacheRefreshInterval>30</cursorCacheRefreshInterval> <queryCacheSize>50</queryCacheSize> <queryCacheRefreshInterval>3600</queryCacheRefreshInterval> <maximumWriteConnections>10</maximumWriteConnections> <maximumReadConnections>10</maximumReadConnections> <minimumReadConnections>1</minimumReadConnections> <minimumWriteConnections>1</minimumWriteConnections> <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval> <multibyte>true</multibyte> <multithreaded>true</multithreaded> <sharedPool>true</sharedPool> <xsiNilForNullData>true</xsiNilForNullData> </dso> </Level> <Level name="silver"> <dso> <cursorCacheSize>50</cursorCacheSize> <cursorCacheRefreshInterval>30</cursorCacheRefreshInterval> <queryCacheSize>50</queryCacheSize> <queryCacheRefreshInterval>3600</queryCacheRefreshInterval> <maximumWriteConnections>5</maximumWriteConnections> <maximumReadConnections>5</maximumReadConnections> <minimumReadConnections>1</minimumReadConnections> <minimumWriteConnections>1</minimumWriteConnections> <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval> <multibyte>true</multibyte> <multithreaded>true</multithreaded> <sharedPool>true</sharedPool> <xsiNilForNullData>true</xsiNilForNullData> </dso> </Level> <Level name="platinum"> <dso> <cursorCacheSize>50</cursorCacheSize> <cursorCacheRefreshInterval>30</cursorCacheRefreshInterval> <queryCacheSize>50</queryCacheSize> <queryCacheRefreshInterval>3600</queryCacheRefreshInterval> <maximumWriteConnections>15</maximumWriteConnections> <maximumReadConnections>15</maximumReadConnections> <minimumReadConnections>1</minimumReadConnections> <minimumWriteConnections>1</minimumWriteConnections> <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval> <multibyte>true</multibyte> <multithreaded>true</multithreaded> <sharedPool>true</sharedPool> <xsiNilForNullData>true</xsiNilForNullData> </dso> </Level> </Levels>
Note: Currently, there is no User Interface for defining levels.
- After defining the levels, Manage Database Configurations screen displays a select box through which the administrator can define the level of the DSO. This will ensure that the Advanced Properties of a DSO are picked from the XML Store.
- If no levels are defined, the Advanced Properties of a DSO are picked from the Service Container.
- Whenever a tenant is changed, the administrator should invoke the ResetTenantCache Web service in the organization of the tenant.
- If a global change that impacts all the tenants is made, the administrator should Reset the Service Container cache.